Method for moving color-makeup tool of automatic color-makeup machine

ABSTRACT

A method for moving a color-makeup tool of an automatic color-makeup machine includes: driving a moving platform to carry a picture capturing module and a color-makeup tool to move relative to a part, to undergo makeup, of a user; during movement of the moving platform, by the picture capturing module, sequentially capturing pictures of the part to undergo makeup to obtain multiple pictures respectively; sequentially comparing an image difference between two consecutively captured pictures among the pictures; determining, according to a comparison result of the image difference, whether the moving platform is positioned; and when the moving platform is positioned, by using the color-makeup tool, performing makeup on the part to undergo makeup.

CROSS-REFERENCES TO RELATED APPLICATIONS

This non-provisional application claims priority under 35 U.S.C. §119(a)on Patent Application No. 101149086 filed in Taiwan, R.O.C. on 2012 Dec.21, the entire contents of which are hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates to a method for moving a color-makeup toolof an automatic color-makeup machine.

2. Related Art

Wanting to be beautiful is a natural human desire, so various majormanufacturers provide the market with a wide variety of care productsand cosmetics for consumers to purchase. However, in order to composemakeup that a person likes and is suitable to the person, makeuptechniques must be practiced repeatedly, and various cosmetics andmakeup tools purchased, so as to draw various eyebrow shapes, variouseye lines, eyelashes, eye contours, face makeup, labial makeup,appearance modifications, and various color changes. However thedifference in proficiency in the makeup techniques and the wide range ofcosmetics usually results in a difference between the effect of themakeup and the effect expected by the consumer.

As the information technology evolves constantly, a simulation devicefor trying color-makeup or a care product is provided by some research.Through the simulation device for trying color-makeup or a care product,a user may simulate an effect of makeup on a screen before purchaseinstead of trying a color-makeup product in person. However, thesimulating the effect of the color-makeup on the screen still depends onmanual makeup skills that apply the color-makeup on the human face.Further, the real effect of manual makeup performed by the user is notnecessarily equal to the effect simulated and presented on the screen.

Therefore, if automatic control can be applied to perform color-makeup,a color-makeup effect simulated on the screen may be presented moretruly. For automatic control in a three-dimensional space, generallyinformation on a relative distance is provided through a laser beam, aninfrared ray, or ultrasonic waves. However, a laser range-finding deviceis expensive. Further, the use of laser range-finding has risk ofharming the human body, and is therefore not applicable to range-findingapplications regarding relative movement of the human body. An infraredrange-finding device is cheap, easy to manufacture, and safe, but haslow accuracy and poor directionality. Ultrasonic range-finding isgreatly affected by a surrounding environment, and therefore has lowaccuracy.

SUMMARY

In an embodiment, a method for moving a color-makeup tool of anautomatic color-makeup machine includes: driving a moving platform tocarry a picture capturing module and a color-makeup tool to moverelative to a part, to undergo makeup, of a user; during movement of themoving platform, by the picture capturing module, sequentially capturingpictures of the part to undergo makeup to obtain a plurality of picturesrespectively; sequentially comparing an image difference between twoconsecutively captured pictures among the pictures; determining,according to a comparison result of the image difference, whether themoving platform is positioned; and when the moving platform ispositioned, by using the color-makeup tool, performing makeup on thepart to undergo makeup.

In some embodiments, the step of comparing the image difference betweeneach two pictures may include: performing feature analysis on eachpicture to obtain a feature image, corresponding to a same feature ofthe part to undergo makeup, in the picture; and calculating a sizechange between the feature images of the two pictures by a processingunit.

In this case, the step of determining whether the moving platform ispositioned may include: calculating, according to the size change and amovement distance of the moving platform between the two pictures arecaptured, a distance between the moving platform and the part to undergomakeup by the processing unit; comparing the calculated distance with athreshold; and when the distance is smaller than or equal to thethreshold, determining that the moving platform is positioned.

The size change may be an image magnification between the feature imagesof the two pictures.

The position of the part to undergo makeup is fixed.

In some embodiments, the step of comparing the image difference betweenthe each two pictures may include: performing edge analysis on the twopictures, to obtain an edge in each of the pictures; and calculating achange amount between the edges of the two pictures.

In this case, the step of determining whether the moving platform ispositioned may include: comparing the calculated change amount with aspecified change amount; and when the calculated change amount has thespecified change amount, determining that the moving platform ispositioned.

The step of comparing the image difference between the each two picturesmay further include: before edge analysis is performed on at least oneof the two pictures, adjusting, according to positions of the movingplatform and camera parameters of the picture capturing module when thetwo pictures are obtained, a size of a picture, not undergoing the edgeanalysis, among the two pictures. In this case, the edge analysis stepincludes: performing edge analysis on a picture, not undergoing sizeadjustment, among the two pictures; and performing edge analysis on theadjusted picture.

The step of comparing the image difference between the each two picturesmay further include: before the change amount is calculated, adjusting asize of the image of the edge of one of the two pictures according topositions of the moving platform and camera parameters of the picturecapturing module when the two pictures are obtained. In this case, thestep of calculating the change amount includes: calculating a changeamount between the edge, not undergoing image size adjustment, among theedges and the adjusted edge.

In some embodiments, the change amount may be a difference between theedges regarding the number of pixels. In this case, the edge may includean image of a front end of the color-makeup tool and an image of anindentation on the part to undergo makeup.

In some embodiments, the change amount may be a difference between theedges regarding corresponding positions. In this case, the edge mayinclude an image of a front end of the color-makeup tool.

In some embodiments, the step of performing edge analysis on each of thepictures includes: performing feature analysis on the picture to obtainan image of a front end of the color-makeup tool in the picture;expanding an analysis window centered around the image of the front end;and performing edge analysis on a picture block, in the analysis window,of the picture to obtain the edge. A size of the analysis window issmaller than a size of the picture to which the analysis window belongs.

In this case, the edge may include an image of a front end of thecolor-makeup tool. Further, the edge may further include an image of anindentation on the part to undergo makeup.

In view of the above, the method for moving a color-makeup tool of anautomatic color-makeup machine according to the present inventionperforms color-makeup through automatic control, so as to more trulypresent a color-makeup effect simulated on a screen. Further, in themethod for moving a color-makeup tool of an automatic color-makeupmachine according to the present invention, it is accurately and safelydetermined according to the picture change whether the moving platformis positioned.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will become more fully understood from thedetailed description given herein below for illustration only, and thusnot limitative of the present invention, wherein:

FIG. 1 is a schematic three-dimensional view of an automaticcolor-makeup machine according to an embodiment of the presentinvention;

FIG. 2 is a schematic block diagram of an automatic color-makeup machineaccording to an embodiment of the present invention;

FIG. 3 is a flow chart of a method for moving a color-makeup tool of anautomatic color-makeup machine according to a first embodiment of thepresent invention;

FIG. 4 and FIG. 5 are flow charts of a method for moving a color-makeuptool of an automatic color-makeup machine according to a secondembodiment of the present invention;

FIG. 6 is a schematic view of a first embodiment of a first picture;

FIG. 7 is a schematic view of a first embodiment of a second picture;

FIG. 8 and FIG. 9 are flow charts of a method for moving a color-makeuptool of an automatic color-makeup machine according to a thirdembodiment of the present invention;

FIG. 10 is a detailed flow chart of an embodiment of Step S357;

FIG. 11 is a detailed flow chart of an embodiment of Step S359;

FIG. 12 is a partial flow chart according to a fourth embodiment of thepresent invention;

FIG. 13 is a partial flow chart according to a fifth embodiment of thepresent invention;

FIG. 14 is a partial flow chart according to a sixth embodiment of thepresent invention;

FIG. 15 is a partial flow chart according to a seventh embodiment of thepresent invention;

FIG. 16 is a schematic view of a second embodiment of a first picture;

FIG. 17 is a schematic view of a second embodiment of a second picture;

FIG. 18 is a partial flow chart according to an eighth embodiment of thepresent invention;

FIG. 19 is a schematic view of a third embodiment of a first picture;and

FIG. 20 is a schematic view of a third embodiment of a second picture.

DETAILED DESCRIPTION

Terms such as “first” and “second” in the following description are usedfor distinguishing elements, but not used for sequencing or limitingdifferences between the elements, and not used for limiting the scope ofthe present invention.

Please refer to FIG. 1 to FIG. 3, an automatic color-makeup machine 10includes a moving module 11, a color-makeup tool 13, a fixing module 14,a drive unit 15, a picture capturing module 17, a user interface 18, anda processing unit 19.

The processing unit 19 is connected electrically to the drive unit 15,the picture capturing module 17, and the user interface 18.

The user interface 18 enables a user to perform color-makeup design on atwo-dimensional picture, so as to generate a makeup instructioncorresponding to a color-makeup design result. In this case, theprocessing unit 19 may automatically apply a makeup material to asurface of a user 20 through the color-makeup tool 13 according to themakeup instruction, to perform makeup.

The moving module 11 includes a moving platform 111, a lifter 112, ahorizontal rail 113, and a telescopic platform 114. The horizontal rail113 spans on the lifter 112, and by adjusting the lifter 112, thehorizontal rail 113 is enabled to move vertically along a firstdirection (for example, the Y-axis direction in the drawing). Thetelescopic platform 114 is slidably disposed on the horizontal rail 113,and the telescopic platform 114 can move left and right on thehorizontal rail 113 along a second direction (for example, the X-axisdirection in the drawing). The moving block 111 is disposed on thetelescopic platform 114, and the moving block 111 can move back andforth on the telescopic platform 114 along a third direction (forexample, the Z-axis direction in the drawing).

Herein, the drive unit 15 (for example, a motor), controlled by theprocessing unit 19 carries the moving platform 111, the lifter 112 andthe telescopic platform 114, so that the moving platform 111 can move ina three-dimensional manner accordingly to be precisely positioned.

The color-makeup tool 13 and the picture capturing module 17 aredisposed on the moving platform 111. Herein, under the condition ofbeing capable of being carried by the moving platform 111 (that is,being capable of moving along with the moving platform 111), thecolor-makeup tool 13 and the picture capturing module 17 may be disposeddirectly or indirectly on the moving platform 111. Herein, a sensingsurface of the picture capturing module 17 faces a part, to undergomakeup, of the user 20 (for example, the face, an eye, a nail, a handback, or an arm).

Herein, according to an application manner of the makeup material, thecolor-makeup tool 13 may be of a contact type, a non-contact type, or acombination thereof. A non-contact color-makeup tool 13 is, for example,a spray head, a nozzle, or an equivalent tool thereof. A non-contactcolor-makeup tool 13 may have one or more output holes, and the outputhole thereof is used for spraying the makeup material to a surface ofthe part, to undergo makeup, of the user 20. A contact color-makeup tool13 is, for example, a powder brush, a powder puff, a coating pen, or anequivalent tool thereof. A contact color-makeup tool 13 may have one ormore front ends (for example, the free end of bristles or a tip), andthe front end is used for coating the surface of the part, to undergomakeup, of the user 20 with the makeup material.

The part, to undergo makeup, of the user 20 is disposed on the fixingmodule 14, to fix the position of the user 20. In some embodiments,taking the face (that is, the part to undergo makeup), as an example,the fixing module 14 includes a lower-jaw support 141 and an overheadpositioning member 143. The lower-jaw support 141 is used by the user toplace the lower jaw thereof, to support the head (face), of the user 20.The overhead positioning member 143 is disposed above the lower-jawsupport 141. Herein, the overhead positioning member 143 has anarc-shaped holding portion 144 corresponding to the forehead. Duringuse, the user 20 may urge the forehead thereof against the holdingportion 144 of the overhead positioning member 143, and urge the chinagainst the lower-jaw support 141, so as to ensure that the face of theuser 20 is opposite to the position of the moving module 111.

The makeup instruction has two-dimensional track information formed ofmultiple positioning points. Each positioning point is formed of anX-coordinate value and a Y-coordinate value. The processing unit 19positions the moving platform 111 sequentially according to thepositioning points in the makeup instruction.

According to the X-axis coordinate values and the Y-axis coordinatevalues of the positioning points, the processing unit 19 uses the driveunit 15 to control positions of the moving platform 111 on the X-axisand on the Y-axis (Step S30), and implements a method for moving thecolor-makeup tool of the automatic color-makeup machine according to thepresent invention to control and determine a position of the movingplatform 111 on the Z-axis. In other words, the method for moving thecolor-makeup tool of the automatic color-makeup machine according to thepresent invention may be implemented by a software program capable ofbeing executed by the processing unit 19.

The control, by the processing unit 19, of a movement position of themoving platform 111 on the Z-axis is illustrated below fordemonstration.

The processing unit 19 controls, according to a makeup instruction, thedrive unit 15 to drive the moving platform 111, so that the movingplatform 111 carries the picture capturing module 17 and thecolor-makeup tool 13 to move relative to a part, to undergo makeup, ofthe user 20, that is, to move along the Z-axis (Step S31).

During movement of the moving platform 111, the picture capturing module17 sequentially captures pictures of the part, to undergo makeup, of theuser 20, to obtain multiple pictures respectively (Step S33).

The processing unit 19 receives the pictures captured by the picturecapturing module 17. Further, the processing unit 19 sequentiallycompares an image difference between two consecutively captured pictures(Step S35).

The processing unit 19 determines, according to a comparison result ofthe image difference, whether the moving platform 111 is positioned onthe Z-axis (Step S37).

When the moving platform 111 is positioned, makeup is performed on thepart, to undergo makeup, of the user 20 by using the color-makeup tool13 (Step S39).

Step 35 and Step 37 may include implementations such as analyzing apicture size change and analyzing an edge change in a picture.

For convenience of description, in the following, a position that isreached first is called a first position, a next position that isreached after the first position is called a second position, a picturethat is captured first (that is, a picture captured at the firstposition). is called a first picture, and a picture that is capturedafter the first picture (that is, a picture captured at the secondposition). is called a second picture.

The implementation of analyzing the picture size change is exemplarilyillustrated first.

Please refer to FIG. 4 and FIG. 5, in which the processing unit 19controls the drive unit 15 to drive the moving platform 111 to approacha part, to undergo makeup, of the user 20, so that the moving platform111 carries the color-makeup tool 13 and the picture capturing module 17thereon to move to a first position (Step S311).

In the current position (the first position at the moment), the disposedpicture capturing module 17 is used to capture a picture of the part, toundergo makeup, of the user 20, to obtain a first picture (Step S331).

The processing unit 19 receives the first picture, and performs featureanalysis on the first picture to obtain a feature image of the firstpicture (which is called the first feature image in the following forconvenience of description) (Step S351). Please refer to FIG. 6, inwhich the first picture Po1 includes a first feature image Pf1corresponding to a feature of the user 20. For example, when the face(of the user 20), has a mole (a feature of the user 20), the capturedfirst picture Po1 includes an image of the mole (that is, the firstfeature image Pf1).

After the first picture is captured, the processing unit 19 thencontrols the drive unit 15 to drive the moving platform 111 to approachthe part, to undergo makeup, of the user 20, so that the moving platform111 carries the color-makeup tool 13 and the picture capturing module 17thereon to move from the first position to a next position (that is, asecond position) (Step S313).

Then, in the current position (the second position at the moment), thepicture capturing module 17 is used to capture a picture of the part, toundergo makeup, of the user 20 again, to obtain a second picture (StepS333).

The processing unit 19 receives the second picture, and performs featureanalysis on the second picture to obtain a feature image of the secondpicture (which is called the second feature image in the following forconvenience of description) (Step S353). Please refer to FIG. 7, inwhich the second picture Po2 includes a second feature image Pf2corresponding to a feature of the user 20. Further, the second featureimage Pf2 in the second picture Po2 and the first feature image Pf1 inthe first picture Po1 correspond to the same feature of the user 20. Forexample, when the face (of the user 20), has a mole (a feature of theuser 20), the processing unit 19 searches for an image of the mole (thatis, the first feature image Pf1), in the captured first picture Po1 andan image of the same mole (that is, the second feature image Pf2) in thecaptured second picture Po2 respectively.

The processing unit 19 calculates a size change of the first featureimage Pf1 and the second feature image Pf2 (Step S355). Herein, theprocessing unit 19 may obtain the size change by calculating an imagemagnification, such as an area ratio, a pixel ratio, or a picture lengthratio, of the first feature image Pf1 and the second feature image Pf2.

Then, the processing unit 19 calculates, according to the calculatedsize change and a movement distance of the moving platform 111 (that is,a distance between the first position and the second position), adistance between the moving platform 111 and the part, to undergomakeup, of the user 20 when the second picture is captured, that is, adistance between the second position and the part, to undergo makeup, ofthe user 20 (Step S371).

For example, a magnification of the first picture is indicated byEquation 1 below, and a magnification of the second picture is indicatedby Equation 2 below. Further, it can be seen from the first position andthe second position that a relationship indicated by Equation 3 existsbetween P1 and P2.

h1/H=P1/Q  Equation 1

h2/H=P2/Q  Equation 2

P1=P2+X  Equation 3

In the equations, h1 is a picture length of the first picture, H is anobject height, P1 is an object distance when the first picture iscaptured, Q is an image distance of the picture capturing module, h2 isa picture length of the second picture, P2 is an object distance whenthe second picture is captured, and X is the distance between the firstposition and the second position. Further, when the second position iscloser to the part, to undergo makeup, of the user 20 than the firstposition, X is a positive value. On the contrary, when the secondposition is farther from the part, to undergo makeup, of the user 20than the first position, X is a negative value.

It can be seen from Equation 1, Equation 2, and Equation 3 that arelationship indicated by Equation 4 below exists between the firstpicture and the second picture.

$\begin{matrix}{{P\; 2} = \frac{X}{{\frac{h\; 1}{h\; 2} - 1}\;}} & {{Equation}\mspace{14mu} 4}\end{matrix}$

In the equation, h1/h2 represents the size change between the firstfeature image Pf1 and the second feature image Pf2.

In some embodiments, it is assumed that the calculated distance is usedfor determining a distance between the output hole or the front end ofthe color-makeup tool 13 and the surface of the part, to undergo makeup,of the user 20. When elements are assembled, the output hole of thecolor-makeup tool 13 may be aligned with a lens of the picture capturingmodule 17; or a relative distance between the output hole of thecolor-makeup tool 13 and the lens of the picture capturing module 17 isalso taken into account when the processing unit 19 calculates thedistance (Step S371) or sets a threshold used for determination.

Then, the processing unit 19 compares the calculated distance with thethreshold (Step S373), so as to determine whether the calculateddistance is greater than the threshold (Step S375).

When the distance is greater than the threshold, the processing unit 19determines that the moving platform 111 does not reach the position(Step S377), and the processing unit 19 further controls the drive unit15 to drive the moving platform 111 to move towards the part, to undergomakeup, of the user 20, so that the moving platform 111 moves to a nextposition (Step S313). Then, the disposed picture capturing module 17 isused to capture a picture of the part, to undergo makeup, of the user 20again, to obtain a next picture (Step S333). At the moment, in a stepthat follows, the picture captured in previous Step S333 may be directlyused as the first picture, and the new picture captured in Step S333 ofthis time may be used as the second picture. In this case, featureanalysis is not required to be performed on the first picture again(that is, Step S351 is not required to be executed), and instead in StepS355 a previously obtained feature analysis result is directly used(that is, the second feature image obtained by analyzing in previousStep S353 is used as the first feature image), for calculation.

When the distance is smaller than or equal to the threshold, theprocessing unit 19 determines that the moving platform 111 is positioned(Step S379), and then controls the color-makeup tool 13 to apply themakeup material to the surface of the part, to undergo makeup, of theuser 20 (Step S391). After the application step (Step S391) iscompleted, when the moving platform 111 is not required to move for anext positioning point (Step S41), the processing unit 19 controls thedrive unit 15 to stop the moving platform 111. When the moving platform111 is required to move for a next positioning point (Step S41), theprocessing unit 19 controls the drive unit 15 to drive the movingplatform 111 to move to the next positioning point, that is, Step S311is returned to and the steps are executed again.

In some embodiments, the threshold may be within a specific rangedefined by a first value and a second value. The first value is smallerthan the second value.

In other words, the processing unit 19 compares the calculated distancewith the specified range (Step S375).

When a comparison result in Step S375 is that the distance falls betweenthe first value and the second value (that is, is equal to the firstvalue or the second value, or is greater than the first value andsmaller than the second value), the processing unit 19 determines thatthe moving platform 111 is positioned (Step S379).

When a comparison result in Step S375 is that the distance is smallerthan the first value, the processing unit 19 determines that the movingplatform 111 is not positioned (Step S377), and controls the drive unit15 to drive again the moving platform 111 to move in a direction leavingthe part, to undergo makeup, of the user 20, so that the moving platform111 moves to a next position, that is, Step S313 is returned to and thesteps are executed again.

When a comparison result in Step S375 is that the distance is greaterthan the second value, the processing unit 19 determines that the movingplatform 111 is not positioned (Step S411), and controls the drive unit15 to drive again the moving platform 111 to move towards the part, toundergo makeup, of the user 20, so that the moving platform 111 moves toa next position, that is, Step S313 is returned to and the steps areexecuted again.

Although the first feature image Pf1 and the second feature image Pf2are, for example, images of a mole, the present invention is not limitedthereto. In some embodiments, the feature images (that is, the firstfeature image Pf1 and the second feature image Pf2), may be a point (forexample, images of a mole, images of a scar-like mark, or images of apimple), a line (for example, images of a hair such as an eye-lash, abody hair, a head hair, or a mole hair or images of a scar), or anycomplete pattern in the pictures.

In some embodiments, when the part, to undergo makeup, of the user 20does not have any feature thereon, whether positioning is achieved maybe determined by detecting whether the front end of the color-makeuptool 13 contacts the part, to undergo makeup, of the user 20 (that is,the implementation of analyzing an edge change in a picture).

Please refer to FIG. 8 and FIG. 9, in which in other words, in Step S33,the picture captured by the picture capturing module 17 further includesthe image of the front end of the color-makeup tool 13 in addition tothe image of the part, to undergo makeup, of the user 20 (Step S332 andStep S334).

The processing unit 19 performs edge analysis on a first picture amongtwo adjacent pictures to obtain a first edge (Step S357), and performsedge analysis on a second picture among the two adjacent pictures toobtain a second edge (Step S359).

Then, the processing unit 19 calculates a change amount between thefirst edge and the second edge (Step S363), and compares the calculatedchange amount with a specified change amount (Step S374), so as todetermine whether the change amount between the two reaches thespecified change amount (Step S376).

When the change amount between the first edge and the second edge hasthe specified change amount (that is, the calculated change amount issmaller than or equal to the specified change amount), the processingunit 19 determines that the moving platform 111 is positioned (StepS379). At the moment, the processing unit 19 controls the color-makeuptool 13 to apply the makeup material to the surface of the part, toundergo makeup, of the user 20 (Step S391).

After the application step (Step S391) is completed, when the movingplatform 111 is not required to move for a next positioning point (StepS41), the processing unit 19 controls the drive unit 15 to stop themoving platform 111. When the moving platform 111 is required to movefor a next positioning point (Step S41), the processing unit 19 controlsthe drive unit 15 to drive the moving platform 111 to move to the nextpositioning point, that is, Step S311 is returned to and the steps areexecuted again.

When the change between the first edge and the second edge does notexist or does not reach the specified change amount (that is, thecalculated change amount is smaller than the specified change amount),the processing unit 19 determines that the moving platform 111 is notpositioned (Step S377), and the processing unit 19 further controls thedrive unit 15 to drive the moving platform 111 to move towards the part,to undergo makeup, of the user 20, so that the moving platform 111 movesto a next position (Step S313). Then, the disposed picture capturingmodule 17 is used to capture a picture of the part, to undergo makeup,of the user 20 again, to obtain a next picture (Step S333′). At themoment, in a step that follows, the picture captured in previous StepS334 may be directly used as the first picture, and the new picturecaptured in Step S333′ of this time may be used as the second picture.In this case, edge analysis is not required to be performed on the firstpicture again (that is, Step S357 is not required to be executed), andinstead in Step S363 a previously obtained edge analysis result isdirectly used (that is, the second edge obtained by analyzing inprevious Step S357 is used as the first edge) for calculation.

In some embodiments, when the change amount between the first edge andthe second edge reaches the specified change amount, it indicates thatthe front end of the color-makeup tool 13 already contacts the part, toundergo makeup, of the user 20, so that the movement of the movingplatform 111 may be stopped, so as to perform makeup.

When the change between the first edge and the second edge does notexist or does not reach the specified change amount, it indicates thatthe front end of the color-makeup tool 13 does not contact or justcontacts the part, to undergo makeup, of the user 20, so that the movingplatform 111 may be further driven to move towards the part, to undergomakeup, of the user 20.

In some embodiments, the specified change amount may be within aspecified range defined by a first threshold and a second threshold. Thefirst threshold is smaller than the second threshold.

In other words, in Step S374, the processing unit 19 compares thecalculated change amount with the specified range.

When a comparison result in Step S376 is that the change amount fallsbetween the first threshold and the second threshold (that is, is equalto the first threshold or the second threshold, or is greater than thefirst threshold and smaller than the second threshold), the processingunit 19 determines that the moving platform 111 is positioned (StepS379), controls the drive unit 15 to stop driving the moving platform111, and controls the color-makeup tool 13 to perform makeup (StepS391).

When a comparison result in Step S376 is that the change amount issmaller than the first threshold, the processing unit 19 determines thatthe moving platform 111 is not positioned (Step S377), and furthercontrols the drive unit 15 to drive the moving platform 111 to approachthe part, to undergo makeup, of the user 20, so that the moving platform111 moves to a next position (Step S313).

When a comparison result in Step S376 is that the change amount isgreater than the second threshold, the processing unit 19 determinesthat the moving platform 111 is not positioned (Step S377), and furthercontrols the drive unit 15 to drive the moving platform 111 to move in adirection leaving the part, to undergo makeup, of the user 20, so thatthe moving platform 111 moves to a next position (Step S313).

In some embodiments, please refer to FIG. 10 and FIG. 11, in whichduring edge analysis of each picture (Step S357 or Step S359), theprocessing unit 19 may first perform feature analysis on the picture(the first picture or the second picture), to obtain an image of thefront end of the color-makeup tool 13 in the picture (Step S3571 or StepS3591), and expands an analysis window centered around the image of thefront end of the color-makeup tool 13 (Step S3573 or Step S3593). A sizeof the picture block displayed by the analysis window is smaller thanthat of the original picture.

Then, the processing unit 19 performs edge analysis on the picture blockin the analysis window, to obtain an edge in the picture block (a firstedge or a second edge) (Step S3575 or Step S3595).

In some embodiments, before calculating the change amount, theprocessing unit 19 may first perform size adjustment on one of twoconsecutively obtained pictures (or edge images thereof), so that thetwo consecutively obtained pictures (or the edge images thereof) havethe same magnification.

In some embodiments, please refer to FIG. 12 and FIG. 13, in whichbefore performing the edge analysis, the processing unit 19 may firstadjust a picture size of one of the two pictures (that is, the firstpicture or the second picture), according to the positions of the movingplatform 111 (that is, the first position and the second position). andcamera parameters of the picture capturing module 17 (such as the focallength and the image distance) when the two pictures are captured (StepS356 or Step S358), so that the two pictures have the samemagnification. Then, the processing unit 19 performs edge analysis onthe adjusted first picture or the adjusted second picture, to obtain anedge in the picture (Step S357′ or Step S359′).

In some embodiments, please refer to FIG. 14, in which after the firstedge is obtained (Step S357), the processing unit 19 may directly adjustthe size of the edge image of the first edge according to the firstposition, the second position, and the camera parameters of the picturecapturing module 17 (Step S361), and then compare the second edge withthe adjusted first edge to obtain a change amount between the two (StepS363′).

In some embodiments, please refer to FIG. 15, in which after the secondedge is obtained (Step S359), the processing unit 19 may directly adjustthe size of the edge image of the second edge according to the firstposition, the second position, and the camera parameters of the picturecapturing module 17 (Step S362), and then compares the first edge withthe adjusted second edge to obtain a change amount between the two (StepS363″).

When the processing unit 19 adjusts the size of the first obtainedpicture (that is, the first picture), or the edge image thereof (thatis, the first edge), Step S356 or Step S361 is required to be executedafter the processing unit 19 obtains information of the second position(that is, after Step S313).

When the distance between the first position and the part, to undergomakeup, of the user 20 is greater than the distance between the secondposition and the part, to undergo makeup, of the user 20, in Step S356or Step S361, the processing unit 19 zooms in the first picture or thefirst edge according to the first position, the second position, and thecamera parameters of the picture capturing module 17.

Further, when the distance between the first position and the part, toundergo makeup, of the user 20 is greater than the distance between thesecond position and the part, to undergo makeup, of the user 20, in StepS358 or Step S362, the processing unit 19 zooms out the second pictureor the second edge according to the first position, the second position,and the camera parameters of the picture capturing module 17.

On the contrary, when the distance between the first position and thepart, to undergo makeup, of the user 20 is smaller than the distancebetween the second position and the part, to undergo makeup, of the user20, in Step S356 or Step S361, the processing unit 19 zooms out thefirst picture or the first edge according to the first position, thesecond position, and the camera parameters of the picture capturingmodule 17.

Further, when the distance between the first position and the part, toundergo makeup, of the user 20 is greater than the distance between thesecond position and the part, to undergo makeup, of the user 20, in StepS358 or Step S362, the processing unit 19 zooms in the second picture orthe second edge according to the first position, the second position,and the camera parameters of the picture capturing module.

For example, a magnification of the first picture is indicated byEquation 5 below, and a magnification of the second picture is indicatedby Equation 6 below. Further, it can be seen from the first position andthe second position that a relationship indicated by Equation 7 existsbetween P1 and P2.

h1/H=P1/Q  Equation 5

h2/H=P2/Q  Equation 6

P1=P2+X  Equation 7

In the equations, h1 is a picture length of the first picture, H is anobject height, P1 is an object distance when the first picture iscaptured, Q is an image distance of the picture capturing module, h2 isa picture length of the second picture, P2 is an object distance whenthe second picture is captured, and X is the distance between the firstposition and the second position.

According to Equation 5, Equation 6, Equation 7, and a basic opticalformula (Equation 8), it can be seen that a relationship indicated byEquation 9 below exists between the first picture and the secondpicture.

1/P2+1/Q=1/f2  Equation 8

h1/h2=1+X/P2=1+X(1/f2+1/Q)  Equation 9

In the equations, f2 is the focal length when the second picture iscaptured.

Therefore, the processing unit 19 may adjust the picture size or theedge image size according to Equation 9.

In some embodiments, the edge change (the change amount between thefirst edge and the second edge), may correspond to a deformationincurred to the front end of the color-makeup tool 13 by contact withthe part, to undergo makeup, of the user 20, or an indentation (forexample, a recess or lines), incurred to the part, to undergo makeup, ofthe user 20 by pressing of the front end of the color-makeup tool 13.

For example, if the front end of the color-makeup tool 13 is notdeformed when the second picture is captured, the position of the firstedge in the first picture (that is, an edge of the image of the frontend of the color-makeup tool 13), and the position of the second edge inthe second picture (that is, an edge of the image of the front end ofthe color-makeup tool 13), are substantially the same, that is, theposition of the second edge falls on the corresponding position of thefirst edge in the second picture.

If the front end of the color-makeup tool 13 is deformed due to contactwith the part, to undergo makeup, of the user 20 when the second pictureis captured, the position of the first edge and the position of thesecond edge do not correspond, that is, the position of the second edgeoffsets and is therefore not in the corresponding position of the firstedge.

For example, the color-makeup tool 13 is a writing brush and the part toundergo makeup is a cheek of the user 20, and when the moving platform111 is in the first position, the writing brush does not contact thecheek of the user 20. At the moment, a first picture Po1 captured by thepicture capturing module 17 in the first position includes an image Ppof a tip of the writing brush (that is, a picture, corresponding to thefront end of the color-makeup tool 13, in an image P13 of thecolor-makeup tool 13), as shown in FIG. 16. Please refer to FIG. 16, inwhich after edge analysis is performed on the first picture Po1, theobtained first edge is a tip edge Pe1 of the image Pp of the tip of thewriting brush.

Then, when the moving platform 111 is in the second position, thewriting brush contacts the cheek of the user 20. At the moment, a secondpicture Po2 captured by the picture capturing module 17 in the secondposition also includes an image Pp of the tip of the writing brush (thatis, a picture, corresponding to the front end of the color-makeup tool13, in the image P13 of the color-makeup tool 13), but the writing brushis deformed because of pressing the cheek, as shown in FIG. 17. Pleaserefer to FIG. 17, in which after edge analysis is performed on thesecond picture Po2, the obtained second edge is a tip edge Pe2 of theimage Pp of the tip of the writing brush.

When the tip edge Pe1 is compared with the tip edge Pe2, it can be seenthat positions of a part of pixels in the tip edge Pe2 are differentfrom those of the corresponding pixels in the tip edge Pe1. In otherwords, a change amount between the first edge and the second edge (thatis, the number of pixels with the corresponding positions beingdifferent), falls between the first threshold and the second threshold,so that the processing unit 19 determines that the moving platform 111is positioned in the position on the Z-axis.

In some embodiments, please refer to FIG. 16 to FIG. 18, in which beforeStep S363 (or Step S363′, or Step S363″), is performed, the processingunit 19 may first make the first picture and the second picture align(Step S360). In Step S34, the processing unit 19 performs featureanalysis on the first picture and the second picture to obtain images ofa same feature of the first picture and the second picture (for example,images of a feature on the part, to undergo makeup, of the user 20, orimages Pb of a body of the color-makeup tool 13) (Step S3601), and usesthe images of the same feature to make the first picture and the secondpicture align (Step S3603). Then, the processing unit 19 calculates thechange amount between the first edge and the second edge (Step S363,Step S363′, or Step S363″).

In another case, if the front end of the color-makeup tool 13 does notpress the part, to undergo makeup, of the user 20 when the secondpicture is captured, the number of pixels of the first edge in the firstpicture (that is, the edge of the image of the front end of thecolor-makeup tool 13), is substantially the same as the number of pixelsof the second edge in the second picture (that is, the edge of the imageof the front end of the color-makeup tool 13).

If an indentation is incurred to the part, to undergo makeup, of theuser 20 by the front end of the color-makeup tool 13 pressing thesurface of the part, to undergo makeup, of the user 20 when the secondpicture is captured, the number of pixels of the first edge in the firstpicture (that is, the edge of the image of the front end of thecolor-makeup tool 13), is smaller than the number of pixels of thesecond edge in the second picture (that is, the edge of the image of thefront end of the color-makeup tool 13 and an edge of an image of theindentation).

Further, even if the front end of the color-makeup tool 13 presses thesurface of the part, to undergo makeup, of the user 20 when the firstpicture is captured and when the second picture is captured, themovement distances of the moving platform 111 are different, and thedepth by which the front end of the color-makeup tool 13 presses whenthe first picture is captured is different from that when the secondpicture is captured, so that the size of the indentation incurred to thesurface of the part, to undergo makeup, of the user 20 changesaccordingly. For example, as the depth increases, the size of theindentation increases (a recess deepens or the number of linesincreases). In this case, the number of pixels of the edge in the firstpicture is different from the number of pixels of the edge in the secondpicture because the sizes of the indentation are different (for example,as the size increases, the number of pixels increases).

For another example, the color-makeup tool 13 is an eyebrow pencil, andwhen the moving platform 111 is in the first position, the eyebrowpencil does not contact a cheek of the user 20. At the moment, a firstpicture Po1 captured by the picture capturing module 17 in the firstposition includes an image Pp of a tip of the eyebrow pencil (that is,an image, corresponding to the front end of the color-makeup tool 13, inan image P13 of the color-makeup tool 13), as shown in FIG. 19. Pleaserefer to FIG. 19, in which after edge analysis is performed on the firstpicture Po1, the obtained first edge is a tip edge Pe11 of the image Ppof the tip of the eyebrow pencil.

Then, when the moving platform 111 is in the second position, theeyebrow pencil contacts the cheek of the user 20. At the moment, asecond picture Po2 captured by the picture capturing module 17 in thesecond position also includes an image Pp of the tip of the eyebrowpencil (that is, an image, corresponding to the front end of thecolor-makeup tool 13, in the image P13 of the color-makeup tool 13), andfurther includes an image Ps of an indentation incurred by the tip ofthe eyebrow pencil pressing the cheek, as shown in FIG. 20. Please referto FIG. 20, in which after edge analysis is performed on the secondpicture Po2, the obtained second edge includes a tip edge Pe21 of theimage Pp of the tip of the eyebrow pencil and an indentation edge Pe22of the image Ps of the indentation.

When the first edge is compared with the second edge, it can be seenthat the second edge has the indentation edge Pe22 that the first edgedoes not have. In other words, a change amount between the first edgeand the second edge (that is, the number of pixels of the indentationedge Pe22), falls between the first threshold and the second threshold,so that the processing unit 19 determines that the moving platform 111is positioned in the position on the Z-axis.

In some embodiments, in Step S35, the picture size change may beanalyzed first, and when no feature can be found in Step S35, the edgechange in the picture is analyzed subsequently instead, so as todetermine, according to a corresponding edge change amount, whetherpositioning is achieved. For example, when no feature can be found inStep S351 or Step S353, Step S357 is executed instead, and subsequentsteps are executed after Step S357.

The execution order of the steps is not limited by the presentinvention, and within a reasonable range, some steps may be swappedregarding the execution order or may be executed at the same time. Forexample, in some embodiments, after the picture capturing module 17captures a picture, the processing unit 19 may immediately performfeature analysis on the captured picture. Alternatively, the processingunit 19 may perform feature analysis on a previously captured picturewhen the picture capturing module 17 captures a next picture. In otherwords, Step S351 may be executed between Step S331 and Step S313, orexecuted together with Step S313 or Step S353 at the same time, orexecuted between Step S313 and Step S353. In some embodiments, after thepicture capturing module 17 captures a picture, the processing unit 19may immediately perform edge analysis on the captured picture.Alternatively, the processing unit 19 may perform edge analysis on apreviously captured picture when the picture capturing module 17captures a next picture. In other words, Step S357 may be executedbetween Step S331′ and Step S313, or executed together with Step S313 orStep S359 at the same time, or executed between Step S313 and Step S359.

In some embodiments, the method for moving a color-makeup tool of anautomatic color-makeup machine according to the present invention may beimplemented by a computer program product, so that after a computer(that is, the processing unit 19 of the automatic color-makeup machine),is loaded with and executes the program, the method for moving acolor-makeup tool of an automatic color-makeup machine according to anyembodiment of the present invention can be implemented. In someembodiments, the computer program product may be a readable recordingmedium, and the program is stored in the readable recording medium to beloaded into a computer. In some embodiments, the program may be acomputer program product, and transmitted to the computer in a wiredmanner or wireless manner.

In view of the above, the method for moving a color-makeup tool of anautomatic color-makeup machine according to the present inventionperforms color-makeup through automatic control, so as to more trulypresent a color-makeup effect simulated on a screen. Further, in themethod for moving a color-makeup tool of an automatic color-makeupmachine according to the present invention, it is accurately and safelydetermined according to the picture change whether the moving platformis positioned.

While the present invention has been described by the way of example andin terms of the preferred embodiments, it is to be understood that theinvention need not be limited to the disclosed embodiments. On thecontrary, it is intended to cover various modifications and similararrangements included within the spirit and scope of the appendedclaims, the scope of which should be accorded the broadestinterpretation so as to encompass all such modifications and similarstructures.

What is claimed is:
 1. A method for moving a color-makeup tool of anautomatic color-makeup machine, comprising: driving a moving platform tocarry a picture capturing module and a color-makeup tool to moverelative to a part, to undergo makeup, of a user; during movement of themoving platform, by the picture capturing module, sequentially capturingpictures of the part to undergo makeup to obtain a plurality of picturesrespectively; sequentially comparing an image difference between twoconsecutively captured pictures among the pictures; determining,according to a comparison result of each image difference, whether themoving platform is positioned; and when the moving platform ispositioned, by using the color-makeup tool, performing makeup on thepart to undergo makeup.
 2. The method for moving a color-makeup tool ofan automatic color-makeup machine according to claim 1, wherein the stepof comparing the image difference between the each two picturescomprises: performing feature analysis on each picture to obtain afeature image, corresponding to a same feature of the part to undergomakeup, in the picture; and calculating a size change between thefeature images of the two pictures by a processing unit.
 3. The methodfor moving a color-makeup tool of an automatic color-makeup machineaccording to claim 2, wherein the determination step comprises:calculating, according to the size change and a movement distance of themoving platform between the two pictures are captured, a distancebetween the moving platform and the part to undergo makeup by theprocessing unit; comparing the distance with a threshold; and when thedistance is smaller than or equal to the threshold, determining that themoving platform is positioned.
 4. The method for moving a color-makeuptool of an automatic color-makeup machine according to claim 2, whereinthe size change is an image magnification between the feature images. 5.The method for moving a color-makeup tool of an automatic color-makeupmachine according to claim 1, wherein the determination step comprises:calculating, according to a size change between feature imagescorresponding to a same feature of the part to undergo makeup and amovement distance of the moving platform between the two pictures arecaptured, a distance between the moving platform and the part to undergomakeup by a processing unit; comparing the distance with a threshold;and when the distance is smaller than or equal to the threshold,determining that the moving platform is positioned.
 6. The method formoving a color-makeup tool of an automatic color-makeup machineaccording to claim 4, wherein the size change is an image magnificationbetween the feature images.
 7. The method for moving a color-makeup toolof an automatic color-makeup machine according to claim 1, wherein theposition of the part to undergo makeup is fixed.
 8. The method formoving a color-makeup tool of an automatic color-makeup machineaccording to claim 1, wherein the step of comparing the image differencebetween the each two pictures comprises: performing edge analysis on thetwo pictures, to obtain an edge in each of the pictures; and calculatinga change amount between the edges of the two pictures.
 9. The method formoving a color-makeup tool of an automatic color-makeup machineaccording to claim 8, wherein the determination step comprises:comparing the calculated change amount with a specified change amount;and when the calculated change amount has the specified change amount,determining that the moving platform is positioned.
 10. The method formoving a color-makeup tool of an automatic color-makeup machineaccording to claim 8, wherein the step of comparing the image differencebetween the each two pictures further comprises: before edge analysis isperformed on at least one of the two pictures, adjusting, according topositions of the moving platform and camera parameters of the picturecapturing module when the two pictures are obtained, a size of apicture, not undergoing the edge analysis, among the two pictures;wherein the edge analysis step comprises: performing edge analysis on apicture, not undergoing size adjustment, among the two pictures; andperforming edge analysis on the adjusted picture.
 11. The method formoving a color-makeup tool of an automatic color-makeup machineaccording to claim 8, wherein the step of comparing the image differencebetween the each two pictures further comprises: before the changeamount is calculated, adjusting a size of the image of the edge of oneof the two pictures according to positions of the moving platform andcamera parameters of the picture capturing module when the two picturesare obtained; wherein, the step of calculating the change amountcomprises: calculating a change amount between the edge, not undergoingimage size adjustment, among the edges and the adjusted edge.
 12. Themethod for moving a color-makeup tool of an automatic color-makeupmachine according to claim 8, wherein the change amount is a differencebetween the edges regarding the number of pixels.
 13. The method formoving a color-makeup tool of an automatic color-makeup machineaccording to claim 8, wherein the change amount is a difference betweenthe edges regarding corresponding positions.
 14. The method for moving acolor-makeup tool of an automatic color-makeup machine according toclaim 8, wherein the step of performing edge analysis on each of thepictures comprises: performing feature analysis on the picture to obtainan image of a front end of the color-makeup tool in the picture;expanding an analysis window centered around the image of the front end,wherein a size of the analysis window is smaller than a size of thepicture to which the analysis window belongs; and performing edgeanalysis on a picture block, in the analysis window, of the picture toobtain the edge.
 15. The method for moving a color-makeup tool of anautomatic color-makeup machine according to claim 8, wherein the edgecomprises an image of a front end of the color-makeup tool.
 16. Themethod for moving a color-makeup tool of an automatic color-makeupmachine according to claim 15, wherein the edge further comprises animage of an indentation on the part to undergo makeup.